<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterChangeMqErrorLogMqUuidIndex extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mq_error_log', function (Blueprint $table) {
            $table->dropIndex('idx_mq_uuid');
            $table->unique('mq_uuid', 'uk_mq_uuid');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mq_error_log', function (Blueprint $table) {
            $table->index('mq_uuid', 'idx_mq_uuid');
            $table->dropIndex('idx_mq_uuid');
        });
    }
}
